import originAxios from 'axios';
import obConstants from '@/assets/js/obConstants'

const domainsConfig = () => {
  if (obConstants.SYS.IS_DEV) {
    return {
      domain: obConstants.SYS.DEV_SERVER_RUL
    }
  } else {
    return {
      domain: obConstants.SYS.PROD_SERVER_RUL
    }
  }
};

let axiosConfig = originAxios.create({
  baseURL:domainsConfig().domain,
  timeout: 60000 // request timeout
});

export default axiosConfig
